﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Channels;
using System.Threading.Tasks;

namespace Domain.Models
{
    public class Device
    {
        /// <summary>
        /// 设备状态   0:不在线   1:在线
        /// </summary>
        public int State { get; set; }
        public DateTime LastUpCmdTime { get; set; } = DateTime.MinValue;
        /// <summary>
        /// 
        /// </summary>
        public string ScoketIPPort { get; set; }

        public List<Channel> Channels { get; set; } = new();

        public Position position { get; set; }
        public string Version { get; set; }
        /// <summary>
        /// 出酒状态   0:待出酒   1：出酒中   2：已暂停
        /// </summary>
        public int OOWState { get; set; }

        /// <summary>
        /// 先存状态变更的回调url
        /// </summary>
        public string returnUrl { get; set; }
    }
    public class Position
    {
        public string IMEI { get; set; }
        public string ICCID { get; set; }
        public string Lng { get; set; }
        public string Lat { get; set; }
    }
    /// <summary>
    /// 通道
    /// </summary>
    public class Channel
    {
        /// <summary>
        /// 通道号
        /// </summary>
        public int Number { get; set; }
        /// <summary>
        /// 执行结果
        /// </summary>
        public int RunState { get; set; }
        /// <summary>
        /// 出酒量
        /// </summary>
        public int WineNumber { get; set; }
    }
}
